﻿@model Simple_PM.Models.AuthModel
@{
    ViewBag.Title = "Home Page";
}

<div>

<div class="metroLogin">
<h1>
<img alt="Add User" src="@Url.Content("~/Content/Images/Users/checked_user.png")" />
Login</h1>

@using(Html.BeginForm("LogOn", "Home")){
    
    <div class="display-label">
        @Html.LabelFor(m=>m.Username)        
    </div>
    <div class="editor-field">
        @Html.TextBoxFor(m => m.Username)
    </div>
    
    <div class="display-label">
        @Html.LabelFor(m => m.Password)        
    </div>
    <div class="editor-field">
        @Html.PasswordFor(m => m.Password)
    </div>
    
    <div class="display-label">
        @Html.LabelFor(m => m.RememberMe) 
        @Html.CheckBoxFor(m => m.RememberMe)
    </div>
    
    <div class="display-label">
        <input type="submit" value="Login"  class="loginInputs" />
    </div>
    
    <div class="display-label">
    @if(ViewBag.LoginError != null)
    {
        <div class="error">@ViewBag.LoginError</div>
    }
    </div>
}

</div>

<div class="metroRegister">
<h1>
<img alt="add user" src="@Url.Content("~/Content/Images/Users/add_user.png")" />
Register</h1>

@using (Html.BeginForm("Register", "Home"))
{
    <div class="display-label">
        @Html.LabelFor(m => m.Username)        
    </div>
    <div class="editor-field">
        @Html.TextBoxFor(m => m.Username)
    </div>
    
    <div class="display-label">
        @Html.LabelFor(m => m.Password)        
    </div>
    <div class="editor-field">
        @Html.PasswordFor(m => m.Password)
    </div>
    
    <div class="display-label">
        @Html.LabelFor(m => m.EmailAddress)        
    </div>
    <div class="editor-field">
        @Html.TextBoxFor(m => m.EmailAddress)
    </div>
    
     <div class="display-label">
        <input type="submit" value="Register" class="loginInputs" />
    </div>
    
    <div class="display-label">
    @if (ViewBag.RegisterError != null)
    {
        <div class="error">@ViewBag.RegisterError</div>
    }
    </div>
}

</div>

</div>

<p class="loginMessages">
<strong>Important Note :</strong><br/>
1. Username should be of minimum 3 characters long.<br/>
2. Password should be of minimum 5 characters long.<br/>
</p>